package com.yunji.app.base;

import com.yunji.base.business.SiteLocationBusiness;
import com.yunji.base.params.SiteLocationParam;
import com.yunji.base.vo.SiteLocationVO;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Api(tags = "移动端-点位管理")
@RequestMapping("/gateway/location")
public class GateWaySiteLocationController {

    @Resource
    private SiteLocationBusiness business;

    @ApiOperation("获取点位列表")
    @GetMapping("/getLocationList")
    public Response<List<SiteLocationVO>> getLocationList(SiteLocationParam param){
        return ResponseHelper.successWithPage(business.getLocationList(param),param.getTotal());
    }



}
